/* gpfrmdis.i - TRANSLATE BOOLEAN VALUES IN DOWN FRAME                        */
/* Copyright 1986-2011 QAD Inc., Santa Barbara, CA, USA.                      */
/* All rights reserved worldwide.  This is an unpublished work.              */
/* $Id:: gpfrmdis.i 2366 2010-11-10 01:47:19Z zzh                          $: */
/* $Revision: 1.3 $                                                     */
/*V8:ConvertMode=Maintenance                                            */
/* Revision: 1.2   BY: Vinay Soman           DATE: 09/07/04 ECO: *P2JG* */
/* $Revision: 1.3 $    BY: Manjusha Inglay       DATE: 01/31/05 ECO: *P352* */

&IF DEFINED(gpfrmdis_i) EQ 0
&THEN
   &GLOBAL-DEFINE GPFRMDIS_I DEFINE VARIABLE gpfrmdis_i AS INTEGER NO-UNDO.
   {&GPFRMDIS_I}
&ENDIF

&IF DEFINED(h_frm) EQ 0
&THEN
   &GLOBAL-DEFINE H_FRM DEFINE VARIABLE h_frm AS WIDGET-HANDLE NO-UNDO.
   {&H_FRM}
&ENDIF

&IF DEFINED(h_row) EQ 0
&THEN
   &GLOBAL-DEFINE H_ROW DEFINE VARIABLE h_row AS WIDGET-HANDLE NO-UNDO.
   {&H_ROW}
&ENDIF

&IF DEFINED(h_cell) EQ 0
&THEN
   &GLOBAL-DEFINE H_CELL DEFINE VARIABLE h_cell AS WIDGET-HANDLE NO-UNDO.
   {&H_CELL}
&ENDIF

view frame {&fname}.

repeat gpfrmdis_i = 1 to frame-down({&fname}) + 1:

   display with frame {&fname}.
   down with frame {&fname}.
   pause 0.

end. /* REPEAT gpfrmdis_i =1 TO FRAME-DOWN({&fname}) + 1 */

/* RESTORE FRAME POSITION FOR DESKTOP */
if {us/bbi/gpiswrap.i}
then do:
   repeat gpfrmdis_i = 1 to frame-down({&fname}) + 1:

      display with frame {&fname}.
      up with frame {&fname}.
      pause 0.

   end. /* REPEAT gpfrmdis_i = 1 TO FRAME-DOWN({&fname}) + 1 */
end. /* IF {us/bbi/gpiswrap.i} ... */

clear frame {&fname} all no-pause.

hide frame {&fname} no-pause.

h_frm = frame {&fname}:handle.
h_row = h_frm:first-child.

do while valid-handle(h_row):

   if h_row = h_frm:background
   then do:
      h_row = h_row:next-sibling.
      next.
   end. /* IF h_row = h_frm:background */

   h_cell = h_row:first-child.

   do while valid-handle(h_cell):

      if h_cell:data-type = "logical"
      then
         assign
            h_cell:format = getTermLabel(h_cell:format,50).

      h_cell = h_cell:next-sibling.

    end. /* DO WHILE VALID-HANDLE(h_cell) */

    h_row = h_row:next-sibling.

end. /* DO WHILE VALID-HANDLE(h_row) */
